/*
 * Copyright 2009 rashaguo <rashaguo@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef SERVICE_H
#define SERVICE_H

#include <string>
#include <qthread.h>

class Service : public QThread
{
    Q_OBJECT
public:

    Service();

    virtual ~Service();

    virtual void run() = 0;

    virtual void process(unsigned int session_id,
                        std::string request_id,
                        std::string request_type,
                        std::string request) = 0;

    virtual std::string getServiceName() = 0;

    virtual bool isServerRunning() = 0;

    virtual void stop() = 0;

protected:

   // std::string m_serviceName;
};
#endif
